<?php
/**
* Define the project's root directory
*/
define('ROOT',dirname(__FILE__));
define('DS',DIRECTORY_SEPARATOR);
define('ROOT_PATH',ROOT.DS);

/**
* Initial System Configure
*/
require_once ROOT_PATH.'config'.DS.'InitConfig.php';
new Configure();
/**
* Get the controller's class name
*/
$router = new BaseController(HttpParams::get(STATE), HttpParams::get(ACTION));
$ctrl = $router->getStateClass();
$ctrl .= ucfirst(FOLDER_CTL);
//invoke the class
$app = new $ctrl();
$app->runCommand();
?>